<?php
	if(isset($_SESSION["message"]))
	{
		echo $_SESSION["message"];
		unset($_SESSION["message"]);
	}
?>

<h2>Création d'une Action de Communication</h2>
<form action="index.php?module=administration&amp;action=creerADC" method="POST">
	<p>
		<label class="creation" for="TitreAction">Titre : </label>
		<input type="text" name="TitreAction"/>
	</p>

	<p>
		<label class="creation" for="ThemeAction">Thème : </label>
		<select name="Theme">
		<?php
			foreach($theme as $t)
			{
				echo	'
							<option value="'.$t[CODE_THEME].'">'.$t[LIBELLE_THEME].'</option>
						';
			}
		?>
		</select>
		<input type='submit' value='Ajouter un thème' name='AjoutTheme'/>
	</p>

	<p>
		<label class="creation" for="NbEtudiants">Nombre d'étudiants : </label>
		<input type="number" name="NbEtudiants" min="1" max=<?php echo '"'.NB_MAX_ETU_ADC.'"'?>>
	</p>

	<p>
		<label class="creation" for="Enseignant">Enseignant : </label>
		<select name="Enseignant">
		<?php
			foreach($prof as $p)
			{
				echo	'
							<option value="'.$p[LOGIN_PROF].'">'.$p[NOM_PROF].' '.$p[PRENOM_PROF].'</option>
						';
			}

		?>
		</select>
	</p>

	<p>
		<label class="creation" for="Date">Date :</label>
		<input size=8 type="text" value="     /     /  " name="Date"/>

	</p>

	<p>
		<label class="creation" for="Commentaire">Commentaire :</label>
		<textarea name="Commentaire" rows="8" cols="45"></textarea>

	</p>

	<p>
		<input type='submit' value='Annuler' name='Annuler'/>
		<input type='submit' value='Creer' name='CreerADC'/>
	</p>
</form>